import React, { Fragment } from "react";
import VisuallyHidden from "./VisuallyHidden";

interface ILinkIconProps {
    SVG: React.ComponentType<React.SVGProps<SVGSVGElement>>;
    title: string
}

const SvgIcon = ({SVG, ...props}: ILinkIconProps) => (
    <Fragment>
        <SVG aria-hidden='true' />
        <VisuallyHidden>{props.title}</VisuallyHidden>
    </Fragment>
);

export default SvgIcon;
